package dao;

import domain.Permission;
import domain.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface IPermissionDao {

    @Select("select * from permission where id in(select permissionId from role_permission where roleId =#{id})")
    List<Permission> findById(int id);

    @Select("select * from permission")
    List<Permission> findAll() throws Exception;
}
